/* 
 rem 实现屏幕适配的流程
 1 引入 淘宝库 flexible.js   
 2 拿出公式 来计算  

    手机屏幕  /  设计稿   =  手机中div /  设计稿的div

    手机中div =  手机屏幕  /  设计稿  *  设计稿的div 

             =   10rem  /  750 * ???

  
 3 网页中需要动态变化的 单位 px ->  rem    即可

 */

 @ratio:10rem / 750;

body {
  background-color: #f2f2f2;
  padding-bottom: 55 * @ratio;
}

/* 顶部搜索 */
.top_search {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f2f2f2;
  .search {
    height: 85px;
    display: flex;
    > a {
      width: 105px;
      background-color: aqua;
    }
    .logo {
      background: url(../imgs/logo.png) no-repeat center center / 38px 25px;
    }
    .login {
      background: url(../imgs/mine.png) no-repeat center center / 42px 42px;
    }
    .search_input {
      flex: 1;

      padding: 12px 0;
      input {
        width: 100%;
        height: 100%;
        background-color: #fff;
        border: 2px solid #ccc;
        border-radius: 5px;
      }
    }
  }
  .nav {
    display: flex;
    height: 64 * @ratio;
    a {
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 26 * @ratio;
      color: #666;
    }
  }
}

.banner {
  position: relative;
  ul {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 10px;
    width: 55px;
    display: flex;
    justify-content: space-between;
    li {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background-color: #fff;
      opacity: 0.5;
    }
    .active {
      opacity: 1;
    }
  }
}
// 分类菜单
.category {
  display: flex;
  flex-wrap: wrap;
  li {
    width: 20%;
  }
}

// 小米 商品展示
.goods_show {
  border-top: 8px solid #ccc;
  border-bottom: 8px solid #ccc;
  a {
    float: left;
    width: 50%;
    &:nth-child(1) {
       border-right: 1px solid #fff;
    }
    &:nth-child(2) {
       border-bottom:2px solid #fff;
    }

    //  前两个
    // &:nth-child(-n + 2) {
    //   font-size: 100px;
    // }

    //  后两个
    &:nth-last-child(-n + 2) {
      // color: red;
      border-left: 1px solid #fff;
    }
  }
}


footer{
  display: flex;
  height: 55 * @ratio;
  
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fff;
  a{
    flex:1;
    font-size: 16 * @ratio;
    color:#666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    img{
      width: 30 * @ratio;

    }
  }
}